<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>邀请记录</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../default/css/mui.min.css">
		<link rel="stylesheet" type="text/css" href="../default/css/index.css" />
		<style type="text/css">
			.mui-content{
				background: #fff;
				min-height: 100%;
			}
			.mui-table-view:before{
				height: 0;
			}
			.mui-table-view:after{
				background-color: #F5F6F7;
			}
			.mui-table-view-cell:after{
				background-color: #F5F6F7;
			}
			/*.mui-table-view-cell{
				padding: 20px 10px;
			}*/
			.nocase-box{
				display: none;
			}
			
		</style>
	</head>
	<body>

		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">邀请记录</h1>
		</header>
		
		<div class="mui-content">
			<div class="mui-content-padded mui-text-center">
				<h5>累计邀请</h5>
				<h4 style="margin: 1.625rem auto;"> <b id="friendnum">-</b>人</h4>
			</div>
			<div class="top-shadow"></div>
            <ul class="mui-table-view">
                <li class="mui-table-view-cell mui-collapse">
                    <a class="mui-navigate-right" href="#">一级</a>
                    <div class="mui-collapse-content aclass-nav">
                        <p>暂无数据</p>
                    </div>
                </li>
                <li class="mui-table-view-cell mui-collapse">
                    <a class="mui-navigate-right" href="#">二级</a>
                    <div class="mui-collapse-content bclass-nav">
                        <p>暂无数据</p>
                    </div>
                </li>
                <li class="mui-table-view-cell mui-collapse">
                    <a class="mui-navigate-right" href="#">三级</a>
                    <div class="mui-collapse-content cclass-nav">
                        <p>暂无数据</p>
                    </div>
                </li>
            </ul>
			<div class="nocase-box">
				<div class="mui-table">
					<div class="mui-col-xs-12 mui-col-sm-12 mui-text-center" >
						<img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/zq-news/images/nocase.png" alt="">
					</div>
					<div class="mui-col-xs-12 mui-col-sm-12 mui-inline mui-text-center">
						<h4>暂无记录</h4>
						<h5 style="margin-top: 20px;">你为进行任何操纵</h5>
						<button type="button" class="mui-btn mui-btn-warning cash-withdrawal-btn">邀请好友</button>
					</div>
				</div>
			</div>
			
		</div>

        <script src="../default/js/jquery-2.14.js" type="text/javascript" charset="utf-8"></script>
        <script src="../default/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../default/js/cookie.js"></script>
        <script src="../default/js/code.js" type="text/javascript" charset="utf-8"></script>
        <script src="../default/js/index.js" type="text/javascript" charset="utf-8"></script>
        <script src="../default/js/public.js"></script>


		<script>
			mui.init({
				swipeBack: true //启用右滑关闭功能
			});
            mui.showLoading("正在加载..","div");
            // ajax地址
            $(function () {
                querySubordinate();
            })
            function querySubordinate() {
                // 查出用户的所有下级用户
                $.ajax({
                    url:website+'/UserController/querySubordinate',
                    type:'post',
                    data:{userId:userId},
                    success:function (data) {
                       console.log(data);
                       var html='';
                       var html2='';
                       var html3='';
                       data.data.mapList1.forEach(function (value) {
                               html+='<div class="mui-table">\n' +
                                   '                            <div class="mui-col-xs-3 mui-col-sm-3 mui-inline mui-text-center" >\n' +
                                   '                                <img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/zq-news/icon/user-logo.png" alt="" width="50" class="border-radius5">\n' +
                                   '                            </div>\n' +
                                   '                            <div class="mui-col-xs-9 mui-col-sm-9 mui-inline">\n' +
                                   '                                <h5>'+value.user_name+'</h5>\n' +
                                   '                                <h5>'+value.time+'</h5>\n' +
                                   '                            </div>\n' +
                                   '                        </div>'
                       });
                        data.data.mapList2.forEach(function (value) {
                                html2+='<div class="mui-table">\n' +
                                    '                            <div class="mui-col-xs-3 mui-col-sm-3 mui-inline mui-text-center" >\n' +
                                    '                                <img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/zq-news/icon/user-logo.png" alt="" width="50" class="border-radius5">\n' +
                                    '                            </div>\n' +
                                    '                            <div class="mui-col-xs-9 mui-col-sm-9 mui-inline">\n' +
                                    '                                <h5>'+value.user_name+'</h5>\n' +
                                    '                                <h5>'+value.time+'</h5>\n' +
                                    '                            </div>\n' +
                                    '                        </div>'
                        });
                        data.data.mapList3.forEach(function (value) {
                               html3+='<div class="mui-table">\n' +
                                   '                            <div class="mui-col-xs-3 mui-col-sm-3 mui-inline mui-text-center" >\n' +
                                   '                                <img src="https://srhub.oss-cn-hangzhou.aliyuncs.com/zq-news/icon/user-logo.png" alt="" width="50" class="border-radius5">\n' +
                                   '                            </div>\n' +
                                   '                            <div class="mui-col-xs-9 mui-col-sm-9 mui-inline">\n' +
                                   '                                <h5>'+value.user_name+'</h5>\n' +
                                   '                                <h5>'+value.time+'</h5>\n' +
                                   '                            </div>\n' +
                                   '                        </div>'
                        });
                        $(".aclass-nav").html(html);
                        $(".bclass-nav").html(html2);
                        $(".cclass-nav").html(html3);
                        $("#friendnum").html(data.data.count);
                        mui.hideLoading();
                    },
                    error:function () {
                        mui.showLoading("未知错误..","div");
                    }
                });
            };
			
		</script>
	</body>
</html>
